package com.aiyige.page.publish.selecttag.adapter;

import android.view.View;
import android.widget.TextView;

import com.aiyige.R;
import com.aiyige.page.publish.selecttag.model.SelectTagItem;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.LinkedList;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by zhuyakun on 2017/11/9.
 */

public class SelectTagAdapter extends BaseQuickAdapter<SelectTagItem, SelectTagAdapter.ViewHolder> {
    public SelectTagAdapter() {
        super(R.layout.select_tag_item, new LinkedList<SelectTagItem>());
    }

    @Override
    protected void convert(ViewHolder helper, SelectTagItem item) {
        helper.bindData(item);
    }


    public class ViewHolder extends BaseViewHolder {
        @BindView(R.id.tagTv)
        TextView tagTv;

        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }

        public void bindData(SelectTagItem item) {
            tagTv.setText("#" + item.getName());
        }
    }
}
